package com.kantboot.project.auth.user.service.impl;

import com.kantboot.project.auth.user.entity.CesAuthWechatApplet;
import com.kantboot.project.auth.user.repository.CesAuthWechatAppletRepository;
import com.kantboot.project.auth.user.service.ICesAuthWechatAppletService;
import com.kantboot.project.security.entity.SysUser;
import com.kantboot.project.security.service.ISysSettingService;
import com.kantboot.project.security.service.ISysUserService;
import com.kantboot.project.security.service.impl.SysSettingServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class CesAuthWechatAppletServiceImpl implements ICesAuthWechatAppletService {

    @Resource
    ISysSettingService sysSettingService;
    @Resource
    CesAuthWechatAppletRepository repository;

    @Override
    public CesAuthWechatApplet appletWechatIdByUserJoin() {
        Long appletWechatIdByUserJoin = sysSettingService.getSetting().getAppletWechatIdByUserJoin();
        CesAuthWechatApplet cesAuthWechatApplet = repository.findById(appletWechatIdByUserJoin).get();
        return cesAuthWechatApplet;
    }

}
